package top.lingkang.finaloauth.entity;

import java.util.Arrays;

/**
 * @author lingkang
 * Created by 2022/3/18
 */
public class OauthUser {
    private String username;
    private String password;
    private String[] role = new String[0];

    public OauthUser setRole(String... role) {
        for (String r : role) {
            Arrays.copyOf(this.role, this.role.length + 1);
            this.role[this.role.length] = r;
        }
        return this;
    }

    public String[] getRole() {
        return role;
    }

    public String getUsername() {
        return username;
    }

    public OauthUser setUsername(String username) {
        this.username = username;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public OauthUser setPassword(String password) {
        this.password = password;
        return this;
    }
}
